﻿using System.ComponentModel.DataAnnotations;

namespace OConf.Model.RequestInput.ProjectInfo
{
    /// <summary>
    /// 新增项目信息
    /// </summary>
    public class AddProjectInfoInput: ProjectInfoInputBase
    {
    }
    /// <summary>
    /// 编辑项目信息
    /// </summary>
    public class EditProjectInfoInput : ProjectInfoInputBase
    {
        /// <summary>
        /// 项目编号
        /// </summary>
        [Required(ErrorMessage = "请求参数错误")]
        public string ID { get; set; }
    }

    public class ProjectInfoInputBase
    {
        /// <summary>
        /// 项目名称
        /// </summary>
        [Required(ErrorMessage = "项目名称不能为空")]
        [MaxLength(50, ErrorMessage = "项目名称最多50个字符")]
        public string ProjectName { get; set; }

        /// <summary>
        /// 项目描述
        /// </summary>
        [Required(ErrorMessage = "项目描述不能为空")]
        [MaxLength(200, ErrorMessage = "项目描述最多200个字符")]
        public string ProjectDescription { get; set; }

        /// <summary>
        /// 是否保护
        /// </summary>
        [Required(ErrorMessage = "是否保护不能为空")]
        public bool IsProtect { get; set; }
    }

    /// <summary>
    /// 删除项目参数
    /// </summary>
    public class DeleteProjectInfoInput
    {
        /// <summary>
        /// 项目编号
        /// </summary>
        [Required(ErrorMessage = "请求参数错误")]
        public string ID { get; set; }
    }

    /// <summary>
    /// 项目详情-包含的配置信息
    /// </summary>
    public class GetProjectConfigsInput
    {
        /// <summary>
        /// 项目编号
        /// </summary>
        [Required(ErrorMessage = "请求参数错误")]
        public string ID { get; set; }
    }

    /// <summary>
    /// 分页查询参数
    /// </summary>
    public class QueryProjectInput : QueryPageInputModel
    {
        /// <summary>
        /// 项目名称
        /// </summary>
        public string ProjectName { get; set; }
    }

    /// <summary>
    /// 重置秘钥请求参数
    /// </summary>
    public class ResetSecretKeyInput
    {
        /// <summary>
        /// 项目ID
        /// </summary>
        [Required(ErrorMessage = "请求参数错误")]
        public string ID { get; set; }
    }
}
